package com.aqiang.home.presenter;

import com.aqiang.home.callback.Request;
import com.aqiang.home.contract.HomeContract;
import com.aqiang.home.model.repositroy.HomeRepositroy;

public class HomePresenter extends HomeContract.HomePresenter {
    public HomePresenter(HomeContract.HomeView homeView) {
        super(homeView);
    }

    @Override
    public void getText() {
        mRepositroy.getText(new Request() {
            @Override
            public void ok(String s) {
                if(mView != null && mView.get() != null){
                    mView.get().setText(s);
                }
            }

            @Override
            public void no(String s) {

            }
        });
    }

    @Override
    protected void createRepository() {
        mRepositroy = new HomeRepositroy();
    }
}
